/**
 *
 */
package com.cmcc.awareness;

/**
 * @Date 2018年4月4日 下午5:14:47
 * @author Amish
 * 
 * 通过proto.list解析获得，包括所有业务识别编号和对应名称
 */
public class AppInfo {
	
	/**
	 * 0100009002,WeiXin_Send_VoiceMsg,微信
	 */
	
	String app_num;//XXYYYYYZZZ,eg 0100009002,app_num=num_class+num_subtype+num_content
	String app_subtype_name;//eg WeiXin_VoIP_Voice
	
	private String num_type;//“业务(应用)大类/App Type” 编号：XX , eg 01
	private String num_subtype;//“业务(应用)小类/App Sub-type”：YYYYY , eg 00009
	private String num_content;//“业务(应用)小类细分/App Content 编号”：ZZZ , eg 002
	public String getNum_type() {
		if(num_type == null)
			return num_type = app_num.substring(0, 2);
		return num_type;
	}
	public String getNum_subtype() {
		if(num_subtype == null)
			return num_subtype = app_num.substring(2, 7);
		return num_subtype;
	}
	public String getNum_content() {
		if(num_content == null)
			return num_content = app_num.substring(7, 10);
		return num_content;
	}
	public String getApp_num() {
		return app_num;
	}
	public String getApp_subtype_name() {
		return app_subtype_name;
	}


	private StringBuilder sb = null;
	public String toString(){
		if(sb != null)
			return sb.toString();
		
		sb = new StringBuilder();
		sb.append("\napp_num : "+app_num);
		sb.append("\napp_subtype_name : "+app_subtype_name);
		return sb.toString();
		
		
	}
    
	
    
}
